<!-- 子类损益分析 -->
<template>
  <div class="clas_All">
    <el-table :data="tableData">
      <el-table-column align="center" label="序号" type="index" width="50">
      </el-table-column>
      <el-table-column align="center" prop="stapName" label="原料类别">
      </el-table-column>
      <el-table-column align="center" prop="inAmout" label="实际成本/元">
      </el-table-column>
      <el-table-column align="center" prop="outAmout" label="标准成本/元">
      </el-table-column>
      <el-table-column align="center" prop="prolossAmout" label="损益金额/元">
      </el-table-column>
      <el-table-column label="操作" props="" align="center">
        <template slot-scope="scope">
          <div>
            <el-button size="mini" type="text" @click="OpenClcik(scope.row)"
              >详情</el-button
            >
          </div>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import { diagnosisStapProlossAnalysDetail } from "@/api/system/cost.js";
export default {
  data() {
    return {
      queryParams: {},
      examineOption: [],
      tableData: [],
    };
  },
  created() {
    this.queryParams.ids = this.$route.query.ids;
    this.Getlist();
  },
  methods: {
    handleQuery() {},
    Getlist() {
      diagnosisStapProlossAnalysDetail({ ids: this.queryParams.ids }).then(
        (res) => {
          if (res.code == 200) {
            this.tableData = res.data;
          }
        }
      );
    },
    OpenClcik(v) {
      // sku-detail
      console.log(v);
      this.$router.push({
        path: "/ProfitDetail",
        query: {
          pandianCode: v.pandianCode,
          shopCode: v.shopCode,
          deptCode: v.deptCode,
          stapCode: v.stapCode,
          stapTypeCode: v.stapType,
        },
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.clas_All {
  margin: 20px;
}
</style>
